import Vue from 'vue'

import 'normalize.css/normalize.css' // a modern alternative to CSS resets
import 'amfe-flexible'

import './styles/index.less'

import App from './App'
import store from './store'
import router from './router'

import { Toast } from 'vant'
Vue.use(Toast)

import utils from './utils'
Vue.use(utils)

import './permission' // permission control
import { Tabbar, TabbarItem, Swipe, SwipeItem } from 'vant';

Vue.use(Tabbar);
Vue.use(TabbarItem);
Vue.use(Swipe)
Vue.use(SwipeItem)
// import Vant from 'vant';
// import 'vant/lib/index.css';

// Vue.use(Vant);
Vue.config.productionTip = false

new Vue({
  el: '#app',
  router,
  store,
  render: h => h(App),
}).$mount('#app')

router.beforeEach((to, from, next) => {
  // 访问的路径在白名单
  document.title = to.meta.title
  next()
  // console.log(to.meta.title);
})
